package com.xyz.comsumer.controller;

import com.xyz.comsumer.feign.RemoteHelloService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class FeignController {
    @Autowired
    RemoteHelloService remoteHelloService;
    @RequestMapping("feignTest")
    public String feignTest(){
        String result = remoteHelloService.hello();
        if(result==null){
            result="出错";
        }
        return result;
    }

    @RequestMapping("feignTest1")
    public String feignTest1(){
        String result = remoteHelloService.test("aaaa","xyz");
        if(result==null){
            result="出错";
        }
        return result;
    }
}
